import { http } from "@/utils/http";

type ResultTable = {
  total?: number;
  data?: Array<any>;
};

//查询边界模板
export const accountingTemplatequery = (data?: object) => {
  return http.request<ResultTable>("post", `/energy/accountingTemplate/query`, {
    data
  });
};
//新增边界模板
export const accountingTemplatesave = (data?: object) => {
  return http.request<ResultTable>("post", `/energy/accountingTemplate/save`, {
    data
  });
};
//修改边界模板
export const accountingTemplateedit = (data?: object) => {
  return http.request<ResultTable>("post", `/energy/accountingTemplate/edit`, {
    data
  });
};
//删除边界模板
export const accountingTemplatedelete = (data?: object) => {
  return http.request<ResultTable>("post", `/energy/accountingTemplate/delete`, {
    data
  });
};
//边界模板详情
export const accountingTemplatedetail = (data?: object) => {
  return http.request<ResultTable>("post", `/energy/accountingTemplate/detail`, {
    data
  });
};

//新增-修改树的父节点
export const accountingBoundarysaveParentNode = (data?: object) => {
  return http.request<ResultTable>("post", `/energy/accountingBoundary/saveParentNode`, {
    data
  });
};

//新增-修改树的子节点
export const accountingBoundarysaveChildren = (data?: object) => {
  return http.request<ResultTable>("post", `/energy/accountingBoundary/saveChildren`, {
    data
  });
};

//删除树节点
export const accountingBoundarydelete = (data?: object) => {
  return http.request<ResultTable>("post", `/energy/accountingBoundary/delete`, {
    data
  });
};

//查看树详情
export const accountingBoundarydetail = (data?: object) => {
  return http.request<ResultTable>("post", `/energy/accountingBoundary/detail`, {
    data
  });
};

//绑定设施活动
export const accountingTemplatebinding = (data?: object) => {
  return http.request<ResultTable>("post", `/energy/accountingTemplate/binding`, {
    data
  });
};

//绑定设施活动
export const accountingTemplateunbind = (data?: object) => {
  return http.request<ResultTable>("post", `/energy/accountingTemplate/unbind`, {
    data
  });
};

//启用禁用模板
export const accountingTemplateenableDisable = (data?: object) => {
  return http.request<ResultTable>("post", `/energy/accountingTemplate/enableDisable`, {
    data
  });
};

//根据树三级节点ID查询绑定的设施活动
export const accountingTemplatequeryBinding = (data?: object) => {
  return http.request<ResultTable>("post", `/energy/accountingTemplate/queryBinding`, {
    data
  });
};

//要添加的设施活动列表
export const accountingTemplatefacilityList = (data?: object) => {
  return http.request<ResultTable>("post", `/energy/accountingTemplate/facilityList`, {
    data
  });
};